<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.AppName}"></h:outputText>
        </ui:define>

        <ui:define name="body">
            <p:panel header="Ergebnisse">
                <p><h:outputText value="Drucken nun hier"></h:outputText></p>
            </p:panel>


            <h:form id="printForm" >

                <p:dataTable id="tbl" var="manual" value="#{PrintManualsBean.manuals}" paginator="true" rows="10">


                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Nummer" />
                        </f:facet>
                        <h:outputText value="#{manual.nr}" />
                    </p:column>

                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Name" />
                        </f:facet>
                        <h:outputText value="#{manual.name}" />
                    </p:column>

                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="Beschreibung" />
                        </f:facet>
                        <h:outputText value="#{manual.beschreibung}" />
                    </p:column>

                    
                    
                </p:dataTable>

                <h:commandLink>
                    <p:graphicImage value="../resources/image/excel.png" />
                    <p:dataExporter type="xls" target="tbl" fileName="Prospect_Unternehmensberatung_Manual" />
                </h:commandLink>

                <h:commandLink>
                    <p:graphicImage value="../resources/image/pdf.png" />
                    <p:dataExporter type="pdf" target="tbl" fileName="Prospect_Unternehemensberatung_Manual" preProcessor="#{PrintManualsBean.preProcessPDF}" />
                </h:commandLink>            

            </h:form>

        </ui:define>



    </ui:composition>

</html>